import java.io.*;
import java.util.Arrays;
import java.util.Collections;
import java.text.Normalizer;

class Squared {
	public static void createDataFile(String outF) throws IOException {
		RandomAccessFile raf = new RandomAccessFile(outF, "rw");
		for (int i=0; i<100; i++)
			raf.writeInt(i*i);
		raf.close();
	}

	public static int readDataFile(String inF, int i) throws IOException {
		RandomAccessFile raf = new RandomAccessFile(inF, "r");
		raf.seek(i*4);
		int ret = raf.readInt();
		raf.close();
		return ret;
	}

	public static void main(String[] arg) {
		try {
			createDataFile("out.dat");
			System.out.println(readDataFile("out.dat", 2));
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
